#include "thread/thread.h"
#include "base/callback.h"
#include "base/logging.h"
#include "gtest/gtest.h"

int global_var = 1;
class MyThread : public Thread {
  void Run() {
    global_var = 2;
  }
};
void MyFun() {
  LOG(INFO) << "hehe";
}

TEST(ThreadTest, CreateThread) {
  MyThread t; 
  t.Start();
  t.Join();
  EXPECT_EQ(2, global_var);
}
